package net.thxjj.mobileServer.dao;

import net.thxjj.mobileServer.util.ParameterMap;
import net.thxjj.sitermodel.Device;
import net.thxjj.sitermodel.MobileUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {
    public void addToken (ParameterMap map);
    public void updateToken (ParameterMap map);
    public void updatePassword (ParameterMap map);
    public ParameterMap getMobileUserByPwd(ParameterMap map);
    public ParameterMap getMobileUserByPwdAndUserId(ParameterMap map);

    public ParameterMap getUserTokenInfo(ParameterMap map);
    public MobileUser getUserInfoByUserId(@Param("user_id")long user_id);

    public ParameterMap getUserInfoByTokenNetty(@Param("access_token")String access_token);

    public ParameterMap getUserByRefreshToken(@Param("refresh_token")String refresh_token,@Param("user_id")long user_id);
    public Device getDeviceInfo(@Param("device_id") String device_id, @Param("bind_key") String bind_key, @Param("ctrl_key") String ctrl_key);

    public void deleteMobileUser(@Param("user_id") long user_id);
    public void deleteMobileUserToken(@Param("user_id") long user_id);
}
